package com.itheima.project.feign;

import com.itheima.project.basic.ResponseWrap;
import com.itheima.project.exception.ProjectException;
import com.itheima.project.hystrix.CashPayHysrtix;
import com.itheima.project.vo.trade.TradingVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @ClassName CashPayFace.java
 * @Description 现金支付方式：商户收钱直接操作
 */
@FeignClient(value = "module-trade-web",fallback = CashPayHysrtix.class)
public interface CashPayFeign {

    /***
     * @description 现金支付方式：商户收钱直接操作接口
     * @param tradingVo 交易单
     * @return  交易单
     */
    @PostMapping("trade-cash/create-cash-trading")
    ResponseWrap<TradingVo> createCashTrading(TradingVo tradingVo) throws ProjectException;

    /***
     * @description 现金退款
     * @param tradingVo 交易单
     * @return  交易单
     */
    @PostMapping("trade-cash/refund-cash-trading")
    ResponseWrap<TradingVo> refundCashTrading(TradingVo tradingVo);
}
